package com.ming.controller;

import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.Map;

@RestController
@RequestMapping("/webhook")
public class WebHookController {
    /**
     * 接收MQTT发送过来的消息
     * @param body
     */
    @PostMapping("/notify")
    public void notify(@RequestBody Map<Object, Object> body) {
        System.out.println(body);
    }
}
